<?php
$user = new Application_Model_User();
$userInfo = $user->getSession(); 
if ($userInfo->firstName || $userInfo->lastName) $name = $userInfo->firstName .' '. $userInfo->lastName;
else $name = $userInfo->email;

if($userInfo->provider != 'web') $urlLogout = $this->baseUrl() . "/logout-provider";
else $urlLogout = $this->baseUrl() . "/logout";

//https://graph.facebook.com/USER_ID/picture
//https://profiles.google.com/s2/photos/profile/116599978027440206136
$avatar = $this->baseUrl() . '/images/users/'. $userInfo->userId .'/'. 'avatar.jpg';

?>
<li class="profile">
    <div id="profile">
        <ul class="list-info">
            <li>
                <a href="<?php echo $this->baseUrl()?>/profile">
                    <img src="<?php echo $this->baseUrl('/images/users/'. $userInfo->userId .'/'. 'avatar.jpg')?>" class="thumb" />
                    <span class="name"><?php echo $name;?></span>
                </a>
            </li>
            <li class="line"><a href="#" title="">Advertise</a></li>
            <li><a href="#" title="">Account Settings</a></li>
            <li><a href="#" title="">Privacy Settings</a></li>
            <li><a href="<?php echo $urlLogout;?>" title="">Log Out</a></li>
            <li class="line"><a href="#" title="">Help</a></li>
        </ul>
    </div>
</li>